#ifndef _HASHMAP_H_
#define _HASHMAP_H_
#include <string>
#define ElementType void*
// #define HashSize 100
class HashMap
{
public:
    HashMap(int HashSize);
    ~HashMap();
    // void SetPtr();
    void Insert(const std::string&key,ElementType value);
    ElementType* Get(const std::string& key);
    ElementType& operator[](const std::string&key);
    void Remove(const std::string& key);
    void show();
    void showBykey();
private:
    struct Node
    {   
        Node(const std::string&key,ElementType value)
        {
            this->key = key;
            data = value;
        }
        std::string key;

        ElementType data;
        Node*next;
    };
    int Hash(const std::string &key);

    int HashSize;
    Node**array;
    // void(*show)(ElementType);
};



#endif